<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
  
  <HEAD><META CONTENT="text/html; charset=utf-8" HTTP-EQUIV="Content-Type">
    <TITLE>nwscode.pydatetime -- Concrete date/time and related types -- prototype implemented in Python.</TITLE>
    <LINK HREF="layout.css" TYPE="text/css" REL="stylesheet">
    
  </HEAD>
  <BODY>
    <DIV ID="page">
      
    <DIV ID="top-nav">
        <H1 ID="doc-title">
        <A HREF="index.html" REL="index">nwscode</A></H1>
        <DIV CLASS="online-navigation">
          <A HREF="index.html" REL="index">index</A>
          <SPAN ID="nav-docs">
            
          </SPAN>
          
          
          <BR>
          
          
          
          <A HREF="module-nwscode.html" TITLE="nwscode reference">
            nwscode
          </A>
          
            
            <A HREF="module-nwscode.pydatetime.html">details</A>
            
            <A HREF="module-nwscode.pydatetime-index.html">
              tree
            </A>
            
          
        </DIV>
    </DIV>
    
    <DIV ID="main-content">
  
  <H1 CLASS="pudge-member-page-heading">
    <TT>pydatetime</TT>
  </H1>
  <H4 CLASS="pudge-member-page-subheading">
    Concrete date/time and related types -- prototype implemented in Python.
  </H4>
  <P CLASS="pudge-member-parent-link">
    <SMALL>
    The pydatetime module is accessible via the
    <A HREF="module-nwscode.html">
      <TT>nwscode</TT>
    </A> module.
    </SMALL>
  </P>
  <DIV ID="pudge-section-nav">
  <UL>
    <LI>
      <A HREF="#attributes" CLASS="pudge-section-link">
        Attributes (2)
      </A>
      
    </LI>
      
    <LI>
      
      <SPAN CLASS="pudge-missing-section-link">
        Functions
      </SPAN>
    </LI>
    <LI>
      <A HREF="#classes" CLASS="pudge-section-link">
        Classes (6)
      </A>
      
    </LI>
      
    <LI>
      
      <SPAN CLASS="pudge-missing-section-link">
        Modules
      </SPAN>
    </LI>
    <LI>
      <A HREF="module-nwscode.pydatetime-index.html" CLASS="pudge-section-link">
        Index
      </A>
    </LI>
    <LI>
      <A HREF="nwscode/pydatetime.py.html" CLASS="pudge-section-link">
        Source
      </A>
    </LI>
  </UL>
  </DIV>
  <DIV STYLE="clear: left">
  </DIV>
  <DIV CLASS="rst pudge-module-doc">
    <P>See <A HREF="http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage" CLASS="reference">http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage</A></P>
<P>See also <A HREF="http://dir.yahoo.com/Reference/calendars/" CLASS="reference">http://dir.yahoo.com/Reference/calendars/</A></P>
<P>For a primer on DST, including many current DST rules, see
<A HREF="http://webexhibits.org/daylightsaving/" CLASS="reference">http://webexhibits.org/daylightsaving/</A></P>
<P>For more about DST than you ever wanted to know, see
<A HREF="ftp://elsie.nci.nih.gov/pub/" CLASS="reference">ftp://elsie.nci.nih.gov/pub/</A></P>
<P>Sources for time zone and DST data: <A HREF="http://www.twinsun.com/tz/tz-link.htm" CLASS="reference">http://www.twinsun.com/tz/tz-link.htm</A></P>
<P>This was originally copied from the sandbox of the CPython CVS repository.
Thanks to Tim Peters for suggesting using it.</P>
  </DIV>
  
  <HR>
  
  
  
  
    <A NAME="attributes">
  
  
    </A>
    <H2>Attributes</H2>
    <DIV CLASS="pudge-member name">
    <A NAME="MINYEAR">
    </A>
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">a</SPAN>
      <TT>
      <A HREF="module-nwscode.pydatetime.html#MINYEAR" CLASS="pudge-obj-link">MINYEAR</A></TT></H4>
    <DIV CLASS="pudge-section rst">
      
      <PRE>1</PRE>
    </DIV>
  </DIV>
  <DIV CLASS="pudge-member name">
    <A NAME="MAXYEAR">
    </A>
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">a</SPAN>
      <TT>
      <A HREF="module-nwscode.pydatetime.html#MAXYEAR" CLASS="pudge-obj-link">MAXYEAR</A></TT></H4>
    <DIV CLASS="pudge-section rst">
      
      <PRE>9999</PRE>
    </DIV>
  </DIV>
    
  
    <A NAME="classes">
    
  
    </A>
    <H2>Classes</H2>
    <DIV CLASS="pudge-member class ">
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">C</SPAN>
      <TT>
        <A HREF="class-nwscode.pydatetime.tmxxx.html" CLASS="pudge-obj-link">tmxxx</A>(...)</TT>
      <A HREF="nwscode/pydatetime.py.html?f=330&amp;l=416#330" CLASS="pudge-member-view-source" TITLE="View Source">...</A>
    </H4>
    <DIV CLASS="pudge-section rst">
      
    
    
  
      
      <P CLASS="note">
        This class contains <A HREF="class-nwscode.pydatetime.tmxxx.html#members">
          5 members</A>.
      </P>
    </DIV>
  </DIV>
  <DIV CLASS="pudge-member class ">
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">C</SPAN>
      <TT>
        <A HREF="class-nwscode.pydatetime.timedelta.html" CLASS="pudge-obj-link">timedelta</A>(...)</TT>
      <A HREF="nwscode/pydatetime.py.html?f=417&amp;l=694#417" CLASS="pudge-member-view-source" TITLE="View Source">...</A>
    </H4>
    <DIV CLASS="pudge-section rst">
      
    <P CLASS="pudge-member-blurb">
      Represent the difference between two datetime objects.
    </P>
    <P>Supported operators:</P>
<UL CLASS="simple">
<LI>add, subtract timedelta</LI>
<LI>unary plus, minus, abs</LI>
<LI>compare to timedelta</LI>
<LI>multiply, divide by int/long</LI>
</UL>
<P>In addition, datetime supports subtraction of two datetime objects
returning a timedelta, and addition or subtraction of a datetime
and a timedelta giving a datetime.</P>
<P>Representation: (days, seconds, microseconds).  Why?  Because I
felt like it.</P>
  
      
      <P CLASS="note">
        This class contains <A HREF="class-nwscode.pydatetime.timedelta.html#members">
          26 members</A>.
      </P>
    </DIV>
  </DIV>
  <DIV CLASS="pudge-member class ">
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">C</SPAN>
      <TT>
        <A HREF="class-nwscode.pydatetime.date.html" CLASS="pudge-obj-link">date</A>(...)</TT>
      <A HREF="nwscode/pydatetime.py.html?f=700&amp;l=984#700" CLASS="pudge-member-view-source" TITLE="View Source">...</A>
    </H4>
    <DIV CLASS="pudge-section rst">
      
    <P CLASS="pudge-member-blurb">
      Concrete date type.
    </P>
    <P>Constructors:</P>
<P>__new__()
fromtimestamp()
today()
fromordinal()</P>
<P>Operators:</P>
<P>__repr__, __str__
__cmp__, __hash__
__add__, __radd__, __sub__ (add/radd only with timedelta arg)</P>
<P>Methods:</P>
<P>timetuple()
toordinal()
weekday()
isoweekday(), isocalendar(), isoformat()
ctime()
strftime()</P>
<P>Properties (readonly):
year, month, day</P>
  
      
      <P CLASS="note">
        This class contains <A HREF="class-nwscode.pydatetime.date.html#members">
          29 members</A>.
      </P>
    </DIV>
  </DIV>
  <DIV CLASS="pudge-member class ">
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">C</SPAN>
      <TT>
        <A HREF="class-nwscode.pydatetime.tzinfo.html" CLASS="pudge-obj-link">tzinfo</A>(...)</TT>
      <A HREF="nwscode/pydatetime.py.html?f=991&amp;l=1062#991" CLASS="pudge-member-view-source" TITLE="View Source">...</A>
    </H4>
    <DIV CLASS="pudge-section rst">
      
    <P CLASS="pudge-member-blurb">
      Abstract base class for time zone info classes.
    </P>
    <P>Subclasses must override the name(), utcoffset() and dst() methods.</P>
  
      
      <P CLASS="note">
        This class contains <A HREF="class-nwscode.pydatetime.tzinfo.html#members">
          6 members</A>.
      </P>
    </DIV>
  </DIV>
  <DIV CLASS="pudge-member class ">
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">C</SPAN>
      <TT>
        <A HREF="class-nwscode.pydatetime.time.html" CLASS="pudge-obj-link">time</A>(...)</TT>
      <A HREF="nwscode/pydatetime.py.html?f=1065&amp;l=1354#1065" CLASS="pudge-member-view-source" TITLE="View Source">...</A>
    </H4>
    <DIV CLASS="pudge-section rst">
      
    <P CLASS="pudge-member-blurb">
      Time with time zone.
    </P>
    <P>Constructors:</P>
<P>__new__()</P>
<P>Operators:</P>
<P>__repr__, __str__
__cmp__, __hash__</P>
<P>Methods:</P>
<P>strftime()
isoformat()
utcoffset()
tzname()
dst()</P>
<P>Properties (readonly):
hour, minute, second, microsecond, tzinfo</P>
  
      
      <P CLASS="note">
        This class contains <A HREF="class-nwscode.pydatetime.time.html#members">
          23 members</A>.
      </P>
    </DIV>
  </DIV>
  <DIV CLASS="pudge-member class ">
    <H4 CLASS="pudge-member-name">
    <SPAN CLASS="prefix">C</SPAN>
      <TT>
        <A HREF="class-nwscode.pydatetime.datetime.html" CLASS="pudge-obj-link">datetime</A>(...)</TT>
      <A HREF="nwscode/pydatetime.py.html?f=1361&amp;l=1794#1361" CLASS="pudge-member-view-source" TITLE="View Source">...</A>
    </H4>
    <DIV CLASS="pudge-section rst">
      
    
    
  
      
      <P CLASS="note">
        This class contains <A HREF="class-nwscode.pydatetime.datetime.html#members">
          46 members</A>.
      </P>
    </DIV>
  </DIV>
    
  
  
  <P>
    <SMALL>
    
    
    See 
    <A HREF="nwscode/pydatetime.py.html" TITLE="nwscode/pydatetime.py:0">the source</A>
    for more information.
    </SMALL>
  </P>
</DIV>
    
    <DIV ID="footer">
      
      <P ID="pudge">
        Built with
        <A HREF="http://lesscode.org/projects/pudge/">
          Pudge/0.1.1</A>
      </P>
      
    </DIV>
    </DIV>
  </BODY>
</HTML>